package com.yeren.string;

public class replaceAll {

	/**
	 * String 
	 */
	public static void main(String[] args) {
		/**
		 * 字符串是数组和字母穿插的形式
		 * */
		String str;
		
		String info[]={"NND","SB","TMD","TNND","CNM"};
		String rex="(";
		for(int i=0;i<info.length;i++){
			rex +=info[i]+"|";
		}
		rex +=(info[info.length-1]+")");
	
		System.out.println(rex);
		str="NND今天装备又被黑了，那个SB团长！";
		str=str.replaceAll(rex, "***");
		System.out.println(str);
	}

}
